from dataaccess import AlbumData
from common import utility


class AlbumBiz(object):
    def __init__(self):
        pass

    def __ValidateInsert(self, album):
        valid = True
        if not valid:
            raise utility.BusinessException(message="",fieldName = "")
        
    def __ValidateUpdate(self, album):
        valid = True
        if not valid:
            raise utility.BusinessException(message="",fieldName = "")
        
    def __ValidateDelete(self, albumID):
        valid = True
        if not valid:
            raise utility.BusinessException(message="",fieldName = "")
        
    def InsertAlbum(self, album):
        self.__ValidateInsert(album)
        albumData = AlbumData.AlbumData()
        return albumData.InsertAlbum(album)

    def UpdateAlbum(self, album):
        self.__ValidateUpdate(album)
        albumData = AlbumData.AlbumData()
        albumData.UpdateAlbum(album)

    def DeleteAlbum(self, albumID):
        self.__ValidateDelete(albumID)
        albumData = AlbumData.AlbumData()
        albumData.DeleteAlbum(albumID)
